const fs = require('fs');
// 获取文件内容
export const getFileData = (filePath,encoding = 'utf8') =>{
  return new Promise((resolve,reject) => {
    fs.readFile(filePath,encoding,function (err,data) {
      if (err) {
        resolve(err); 
      } else {
        resolve(data);
      }
    })
  })
}